<script setup>
  import { ref } from 'vue'
  import { onLoad, onShow } from '@dcloudio/uni-app'

  const id = ref(0)
  function backPay() {
    uni.navigateTo({
      url: `/transactionPage/joinin/index?id=${id.value}`,
    })
  }

  function backSquare() {
    // uni.navigateTo({
    // 	url: '/transactionPage/transaction/index',
    // })
    uni.reLaunch({
      url: '/pages/home/index',
    })
  }

  onLoad((option) => {
    id.value = option.id
  })
</script>

<template>
  <view class="success-content">
    <image
      :src="'https://ojqn.wm2177.com/wechat_imgs/transition/deal-success.png'"
      style="width: 200rpx; height: 200rpx"
      mode=""
    ></image>
    <view class="" style="font-size: 40rpx; font-weight: 700; margin: 12rpx 0">
      出价成功
    </view>
    <view
      class=""
      style="margin-bottom: 40rpx; font-size: 28rpx; color: #9b9b9d"
    >
      可以在“参与”页面查看
    </view>
    <view class="check-button" @click="backPay"> 查看出价 </view>
    <view
      class="check-button"
      style="background-color: #eeeeee; margin-top: 20rpx"
      @click="backSquare"
    >
      返回首页
    </view>
  </view>
</template>

<style lang="scss" scoped>
  .success-content {
    height: 100vh;
    padding-bottom: 300rpx;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    .check-button {
      width: 380rpx;
      height: 84rpx;
      border-radius: 42rpx;
      background-color: $transaction-color;
      text-align: center;
      line-height: 84rpx;
      font-weight: 700;
      font-size: 32rpx;
    }
  }
</style>
